#include <stdio.h>

int read_line(char str[], int n);

int main(void)
{
    int n = 10;
    char str[n];
    char *p = str;

    read_line(p, n);

    puts(str);

    return 0;
}


int read_line(char str[], int n)
{
    int ch, i = 0;

    while ((ch = getchar()) != '\n')
    {
        if (i < n)
            str[i++] = ch;
    }
    str[i] = '\0';
    return i;
}